A software or computer "virus" (sometimes also known as a worm or trojan) is a special piece of program code, usually created by a malicious programmer, that exists within ("infects") an otherwise normal computer program. When an infected program is run, the viral code seeks out other programs within the computer and replicates itself. Infected programs can be anywhere in the system or even the operating system itself, and if undetected can have devastating effects, such as interfering with system operations or destruction of data.
It is difficult for producers of computer software to design and produce products that are adequately secure against infection by such software viruses. The invention disclosed herein provides a method to "harden" or treat existing computer software programs such that the programs protect themselves against possible corruption, including corruption through infection or other modification by software viruses.
A number of methods have been devised that address the detection and prevention of infection by viruses. One approach is to use a separate program, external to the application programs being examined, to search through ("scan") a computer's memory and disk storage for the characteristic pattern ("signature") of a known virus. Examples of products implementing this technique include Virex from MicroCom, Inc. (Durham, N.C.) and Viruscan from MacAfee Associates (Santa Clara, Calif.). The effectiveness of this approach is limited, however, by the fact that it depends on the computer user manually invoking the scanning software from time to time to scan the system. Computer users often fail to run such scans with sufficient frequency to prevent a virus from spreading during the "incubation" period between scans. Moreover, such scans often require users to wait an unacceptable period of time while the entire system is scanned.
Another method to detect alteration of a program involves calculating a checksum value for the program being examined, and comparing it to the known checksum value of the original, pristine version of the program. If the program being examined has been infected by a computer virus or otherwise altered, the checksum value of the program will have changed as well. Examples of products implementing this method include Norton AntiVirus from Symantec Corp. (Cupertino, Calif.), and System Monitor from Rosenthal Engineering (San Luis Obispo, Calif.). This approach suffers from similar limitations, in that it requires that the user remember to invoke the checksum software each time before running any of the user's programs, and that the user remember to have a checksum calculated and stored for any new program when it is installed.
Finally, some prior art application programs embody one or more of the foregoing methods as a built-in function. Examples of such products include Virus Simulator from Rosenthal Engineering (San Luis Obispo, Calif.), and Turbo Debugger from Borland International, Inc. (Scotts Valley, Calif.). Such an approach, however, requires that additional costly effort be expended in the original design of the application program source code to incorporate these functions; further, software programs protected according to this approach will not be able to detect later-created viruses without replacing the entire application program with a new version. Unlike the present invention, the prior art has never been able to secure existing executable application programs by directly coupling security routines to such program.